<?php //$Id: class.common_data.php,v 1.1.1.1 2014/08/23 06:57:06 ymlam Exp $ Copyright (C) 2014 Link2Tek LLC ?>
<?php

 /**
 * Common Data
 * class of static methods that provide access to common, static sets of data.
 *
 * @package     Common_Data
 *
 * @final
 */

/**
 * Common Data
 * class of static methods that provide access to common, static sets of data.
 *
 * @package     Common_Data
 *
 * @final
 */
final class Common_Data
{

	/**
	 * Returns an array of states or a state's name if the $int_state is provided
	 *
	 * @param      integer $int_state - the integer key value of the state
	 * @return     mixed              - An array of all states, or the individual name of the state
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_States($int_state = null)
	{
		$states = array(

    		'Alabama',
    		'Alaska',
    		'Arizona',
    		'Arkansas',
    		'California',
    		'Colorado',
    		'Connecticut',
    		'Delaware',
    		'Florida',
    		'Georgia',
    		'Hawaii',
    		'Idaho',
    		'Illinois',
    		'Indiana',
    		'Iowa',
    		'Kansas',
    		'Kentucky',
    		'Louisiana',
    		'Maine',
    		'Maryland',
    		'Massachusetts',
    		'Michigan',
    		'Minnesota',
    		'Mississippi',
    		'Missouri',
    		'Montana',
    		'Nebraska',
    		'Nevada',
    		'New Hampshire',
    		'New Jersey',
    		'New Mexico',
    		'New York',
    		'North Carolina',
    		'North Dakota',
    		'Ohio',
    		'Oklahoma',
    		'Oregon',
    		'Pennsylvania',
    		'Rhode Island',
    		'South Carolina',
    		'South Dakota',
    		'Tennessee',
    		'Texas',
    		'Utah',
    		'Vermont',
    		'Virginia',
    		'Washington',
    		'Washington DC',
    		'West Virginia',
    		'Wisconsin',
    		'Wyoming '

		);

		return ($int_state !== NULL) ? $states[$int_state] : $states;
	}

	/**
	 * Returns an array of abbreviated states or a state's abbreviated name if the $int_state is provided
	 *
	 * @param      integer $int_state - the integer key value of the state
	 * @return     mixed              - An array of all states, or the individual name of the state
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_StatesShort($int_state = null)
	{

		$states = array(

            '', 'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL',
            'GA', 'HA', 'ID', 'IL', 'IN', 'IO', 'KA', 'KY', 'LO', 'ME',
            'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH',
            'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI',
            'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'DC', 'WV',
            'WI', 'WY'

        );

		return ($int_state !== NULL) ? $states[$int_state] : $states;

	}

	/**
	 * Returns an array of countries or a country's name if the $int_country is provided.
	 *
	 * @param      integer $int_country    - the integer key value of the country
	 * @return     mixed                   - An array of all countries, or the individual name of the country
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_Country($int_country = null)
	{

		$country = array (

            '223'   => 'United States',
            '0'     => 'Afghanistan',
            '1'     => 'Albania',
            '2'     => 'Algeria',
            '3'     => 'American Samoa',
            '4'     => 'Andorra',
            '5'     => 'Angola',
            '6'     => 'Anguilla',
            '7'     => 'Antarctica',
            '8'     => 'Antigua and Barbuda',
            '9'     => 'Argentina',
            '10'    => 'Armenia',
            '11'    => 'Aruba',
            '12'    => 'Australia',
            '13'    => 'Austria',
            '14'    => 'Azerbaijan',
            '15'    => 'Bahamas',
            '16'    => 'Bahrain',
            '17'    => 'Bangladesh',
            '18'    => 'Barbados',
            '19'    => 'Belarus',
            '20'    => 'Belgium',
            '21'    => 'Belize',
            '22'    => 'Benin',
            '23'    => 'Bermuda',
            '24'    => 'Bhutan',
            '25'    => 'Bolivia',
            '26'    => 'Bosnia and Herzegowina',
            '27'    => 'Botswana',
            '28'    => 'Bouvet Island',
            '29'    => 'Brazil',
            '30'    => 'British Indian Ocean Territory',
            '31'    => 'Brunei Darussalam',
            '32'    => 'Bulgaria',
            '33'    => 'Burkina Faso',
            '34'    => 'Burundi',
            '35'    => 'Cambodia',
            '36'    => 'Cameroon',
            '37'    => 'Canada',
            '38'    => 'Cape Verde',
            '39'    => 'Cayman Islands',
            '40'    => 'Central African Republic',
            '41'    => 'Chad',
            '42'    => 'Chile',
            '43'    => 'China',
            '44'    => 'Christmas Island',
            '45'    => 'Cocoa (Keeling) Islands',
            '46'    => 'Colombia',
            '47'    => 'Comoros',
            '48'    => 'Congo',
            '49'    => 'Cook Islands',
            '50'    => 'Costa Rica',
            '51'    => 'Cote Divoire',
            '52'    => 'Croatia (Hrvatska)',
            '53'    => 'Cuba',
            '54'    => 'Cyprus',
            '55'    => 'Czech Republic',
            '56'    => 'Denmark',
            '57'    => 'Djibouti',
            '58'    => 'Dominica',
            '59'    => 'Dominican Republic',
            '60'    => 'East Timor',
            '61'    => 'Ecuador',
            '62'    => 'Egypt',
            '63'    => 'El Salvador',
            '64'    => 'Equatorial Guinea',
            '65'    => 'Eritrea',
            '66'    => 'Estonia',
            '67'    => 'Ethiopia',
            '68'    => 'Falkland Islands (Malvinas)',
            '69'    => 'Faroe Islands',
            '70'    => 'Fiji',
            '71'    => 'Finland',
            '72'    => 'France',
            '73'    => 'France, Metropolitan',
            '74'    => 'French Guiana',
            '75'    => 'French Polynesia',
            '76'    => 'French Southern Territories',
            '77'    => 'Gabon',
            '78'    => 'Gambia',
            '79'    => 'Georgia',
            '80'    => 'Germany',
            '81'    => 'Ghana',
            '82'    => 'Gibraltar',
            '83'    => 'Greece',
            '84'    => 'Greenland',
            '85'    => 'Grenada',
            '86'    => 'Guadeloupe',
            '87'    => 'Guam',
            '88'    => 'Guatemala',
            '89'    => 'Guinea',
            '90'    => 'Guinea-Bissau',
            '91'    => 'Guyana',
            '92'    => 'Haiti',
            '93'    => 'Heard and Mc Donald Islands',
            '94'    => 'Honduras',
            '95'    => 'Hong Kong',
            '96'    => 'Hungary',
            '97'    => 'Iceland',
            '98'    => 'India',
            '99'    => 'Indonesia',
            '100'   => 'Iran (Islamic Republic of)',
            '101'   => 'Iraq',
            '102'   => 'Ireland',
            '103'   => 'Israel',
            '104'   => 'Italy',
            '105'   => 'Jamaica',
            '106'   => 'Japan',
            '107'   => 'Jordan',
            '108'   => 'Kazakhstan',
            '109'   => 'Kenya',
            '110'   => 'Kiribati',
            '111'   => 'Korea, Democratic Peoples Republic of',
            '112'   => 'Korea, Republic of',
            '113'   => 'Kuwait',
            '114'   => 'Kyrgyzstan',
            '115'   => 'Lao Peoples Democratic Republic',
            '116'   => 'Latvia',
            '117'   => 'Lebanon',
            '118'   => 'Lesotho',
            '119'   => 'Liberia',
            '120'   => 'Libyan Arab Jamahiriya',
            '121'   => 'Liechtenstein',
            '122'   => 'Lithuania',
            '123'   => 'Luxembourg',
            '124'   => 'Macau',
            '125'   => 'Macedonia, The Former Yugoslav Republic of',
            '126'   => 'Madagascar',
            '127'   => 'Malawi',
            '128'   => 'Malaysia',
            '129'   => 'Maldives',
            '130'   => 'Mali',
            '131'   => 'Malta',
            '132'   => 'Marshall Islands',
            '133'   => 'Martinique',
            '134'   => 'Mauritania',
            '135'   => 'Mauritius',
            '136'   => 'Mayotte',
            '137'   => 'Mexico',
            '138'   => 'Micronesia, Federated States of',
            '139'   => 'Moldova, Republic of',
            '140'   => 'Monaco',
            '141'   => 'Mongolia',
            '142'   => 'Montserrat',
            '143'   => 'Morocco',
            '144'   => 'Mozambique',
            '145'   => 'Myanmar',
            '146'   => 'Namibia',
            '147'   => 'Nauru',
            '148'   => 'Nepal',
            '149'   => 'Netherlands',
            '150'   => 'Netherlands Antilles',
            '151'   => 'New Caledonia',
            '152'   => 'New Zealand',
            '153'   => 'Nicaragua',
            '154'   => 'Niger',
            '155'   => 'Nigeria',
            '156'   => 'Niue',
            '157'   => 'Norfolk Island',
            '158'   => 'Northern',
            '159'   => 'Mariana Islands',
            '160'   => 'Norway',
            '161'   => 'Oman',
            '162'   => 'Pakistan',
            '163'   => 'Palau',
            '164'   => 'Panama',
            '165'   => 'Papua New Guinea',
            '166'   => 'Paraguay',
            '167'   => 'Peru',
            '168'   => 'Philippines',
            '169'   => 'Pitcairn',
            '170'   => 'Poland',
            '171'   => 'Portugal',
            '172'   => 'Puerto Rico',
            '173'   => 'Qatar',
            '174'   => 'Reunion',
            '175'   => 'Romania',
            '176'   => 'Russian Federation',
            '177'   => 'Rwanda',
            '178'   => 'Saint Kitts and Nevis',
            '179'   => 'Saint Lucia',
            '180'   => 'Saint Vincent and the Grenadines',
            '181'   => 'Samoa',
            '182'   => 'SanMarino',
            '183'   => 'Sao Tome and Principe',
            '184'   => 'Saudi Arabia',
            '185'   => 'Senegal',
            '186'   => 'Seychelles',
            '187'   => 'Sierra Leone',
            '188'   => 'Singapore',
            '189'   => 'Slovakia (Slovak Republic)',
            '190'   => 'Slovenia',
            '191'   => 'Solomon Islands',
            '192'   => 'Somalia',
            '193'   => 'South Africa',
            '194'   => 'South Georgia and the South Sandwich Islands',
            '195'   => 'Spain',
            '196'   => 'Sri Lanka',
            '197'   => 'St. Helena',
            '198'   => 'St. Pierre and Miquelon',
            '199'   => 'Sudan',
            '200'   => 'Suriname',
            '201'   => 'Svalbard and Jan Mayen Islands',
            '202'   => 'Swaziland',
            '203'   => 'Sweden',
            '204'   => 'Switzerland',
            '205'   => 'Syria',
            '206'   => 'Taiwan',
            '207'   => 'Tajikistan',
            '208'   => 'Tanzania, United Republic of',
            '209'   => 'Thailand',
            '210'   => 'Togo',
            '211'   => 'Tokelau',
            '212'   => 'Tonga',
            '213'   => 'Trinidad and Tobago',
            '214'   => 'Tunisia',
            '215'   => 'Turkey',
            '216'   => 'Turkmenistan',
            '217'   => 'Turks and Caicos Islands',
            '218'   => 'Tuvalu',
            '219'   => 'Uganda',
            '220'   => 'Ukraine',
            '221'   => 'United Arab Emirates',
            '222'   => 'United Kingdom',
            '224'   => 'United States Minor Outlying Islands',
            '225'   => 'Uruguay',
            '226'   => 'Uzbekistan',
            '227'   => 'Vanuatu',
            '228'   => 'Vatican City State (Holy See)',
            '229'   => 'Venezuela',
            '230'   => 'Viet Nam',
            '231'   => 'Virgin Islands (British)',
            '232'   => 'Virgin Islands (U.S.)',
            '233'   => 'Wallis and Futuna Islands',
            '234'   => 'Western Sahara',
            '235'   => 'Yeman',
            '236'   => 'Yugoslavia',
            '237'   => 'Zaire',
            '238'   => 'Zambia',
            '239'   => 'Zimbabwe'

        );

		return ($int_country !== NULL) ? $country[$int_country] : $country;

	}

	/**
	 * Returns an array of contact types
	 *
	 * @param      integer $int_type - the integer key value of the contact
	 * @return     mixed              - An array of all contact types, or the individual name of the type
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_ContactType($int_type = null)
	{

		$contact_types = array(

           '1' => 'Student', '2' => 'Faculty', '3' =>'Member', '4' =>'Test'

        );

		return ($int_type !== NULL) ? $contact_types[$int_type] : $contact_types;

	}

	/**
	 * Returns an array of prefix
	 *
	 * @param      integer $int_pre - the integer key value of the prefix
	 * @return     mixed              - An array of all prefixes, or the individual name of the prefix
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_Prefix($int_pre = null)
	{

		$prefix = array(

            "1" => 'Mr.', "2" => 'Mrs.', "3" =>'Ms.'

        );

		return ($int_pre !== NULL) ? $prefix[$int_pre] : $prefix;

	}

	/**
	 * Returns an array of status' for Alerts
	 *
	 * @param      integer $int_status - the integer key value of the prefix
	 * @return     mixed              - An array of status', or the individual name of the status
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_Status($int_status = null)
	{

		$status = array(

            "S" => 'Sent', "I" => 'In-Process', "F" =>'Failed'

        );

		return ($int_status !== NULL) ? $status[$int_status] : $status;

	}


	/**
	 * Returns an array of status' for SOP Indicator
	 *
	 * @param      integer $int_status - the integer key value of the prefix
	 * @return     mixed              - An array of status', or the individual name of the status
	 *
	 * @access     public
	 * @static
	 * @final
	 */
	final public static function cd_SOPIndicator($int_status = null)
	{

		$indicator_types = array(

           'A' => 'Alert', 'M' => 'Message'

        );

		return ($int_status !== NULL) ? $indicator_types[$int_status] : $indicator_types;

	}

	final public static function cd_eventIndicator($int_status = null)
	{

		$indicator_types = array(

           'A' => 'Alert', 'M' => 'Message'

        );

		return ($int_status !== NULL) ? $indicator_types[$int_status] : $indicator_types;

	}
}
?>
